<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSgBlackListTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('st_sg_black_list', function (Blueprint $table) {
            // id, hospital_id, status
            $table->increments('id');
            $table->integer('hospital_id')->default(0)->comment('医院ID');
            $table->integer('doctor_id')->default(0)->comment('医生ID');
            $table->unsignedTinyInteger('status')->default(1)->comment('状态：1拉黑，0放出');
            $table->unsignedTinyInteger('type')->default(1)->comment('类型：1医院，2医生');

            $table->timestamp('created_at')->useCurrent()->comment('生成时间');
            $table->timestamp('updated_at')->useCurrent()->comment('更新时间');

            $table->engine = 'InnoDB';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('st_sg_black_list');
    }
}
